﻿/// <summary>
/// Developer: CHOOI KAH WAI
/// Last Modified: 16/11/2009
/// </summary>

using System;
using System.Collections.Generic;
using System.Collections;

namespace ARSS.Components
{
    /// <summary>
    /// Coordination class to facilitate external plugins
    /// </summary>
    public abstract class Coordinator
    {
        #region Delegates / Events

        /// <summary>
        /// Camera update delegator
        /// </summary>
        /// <param name="buffer">Video Buffer</param>
        public delegate void CameraUpdateHandler(byte[] buffer);

        /// <summary>
        /// AR update delegator
        /// </summary>
        /// <param name="markers">Detected markers</param>
        public delegate void ARUpdateHandler(ArrayList markers);

        /// <summary>
        /// Subscription to camera update event handler
        /// </summary>
        /// <param name="handler">Event Handler</param>
        public abstract void SubscribeCameraUpdateHandler(CameraUpdateHandler handler);

        /// <summary>
        /// Subscription to AR update event handler
        /// </summary>
        /// <param name="handler">Event Handler</param>
        public abstract void SubscribeARUpdateHandler(ARUpdateHandler handler);

        /// <summary>
        /// Unsubscribe camera update event handler
        /// </summary>
        /// <param name="handler">Event Handler</param>
        public abstract void UnSubscribeCameraUpdateHandler(CameraUpdateHandler handler);

        /// <summary>
        /// Unsubscribe AR update event handler
        /// </summary>
        /// <param name="handler">Event Handler</param>
        public abstract void UnSubscribeARUpdateHandler(ARUpdateHandler handler);

        #endregion

        #region Functions

        /// <summary>
        /// Align the view camera
        /// </summary>
        /// <param name="matrix">Projection matrix</param>
        public abstract void AlignCamera(double[] matrix);

        #endregion
    }
}
